from manim import *

class PointMovingOnShapes(Scene):
    """ 
    延 圆边 轨迹移动
    """
    def construct(self):
        circle = Circle(radius=1, color=BLUE)
        dot = Dot(color=RED)
        line = Line([3,0,0],[5,0,0])
        self.add(circle, dot, line)
        self.wait()
        
        self.play(dot.animate.shift(RIGHT))
        self.wait()
        
        # 延圆边 轨迹移动
        self.play(MoveAlongPath(dot, circle), run_time=4, rate_func=linear)
        self.wait()
        
        # 延 线中心点 旋转
        self.play(Rotating(dot, about_point=[4,0,0]), run_time=2)
        self.wait()